package org.jeecg.modules.demo.pointcount.redis.thread.work;

import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.pointcount.entity.OnlineData;
import org.jeecg.modules.demo.pointcount.redis.consumer.SendAndStorageProcess;
import org.jeecg.modules.demo.pointcount.service.IOnlineDataService;

/**
 * @Author yw
 * @Date 2021/3/16 9:11
 */
@Slf4j
public class AddOnlineDataCountTask implements Runnable{
    //private static Logger logger = Logger.getLogger(EventData.class);

    private static SendAndStorageProcess sendAndStorageProcess;

    IOnlineDataService onlineDataService;

    private OnlineData data;


    public AddOnlineDataCountTask(IOnlineDataService onlineDataService, OnlineData data){
        this.data = data;
        this.onlineDataService=onlineDataService;
    }

    public void run() {
        this.onlineDataService.insertOnlineDataCount(data);
    }
}
